From: Keir Fraser Date: Tue, 14 Oct 2008 10:29:46 +0000 (+0100) Subject: Missing file from prev c/s X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14076 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=c848b5c808678f1500b78cae86a67426327c02bf;p=xen.git Missing file from prev c/s --- diff --git a/xen/include/asm-x86/hvm/iommu.h b/xen/include/asm-x86/hvm/iommu.h new file mode 100644 index 0000000000..283c9200a7 --- /dev/null +++ b/xen/include/asm-x86/hvm/iommu.h @@ -0,0 +1,35 @@ +#ifndef __ASM_X86_HVM_IOMMU_H__ +#define __ASM_X86_HVM_IOMMU_H__ + +struct iommu_ops; +extern struct iommu_ops intel_iommu_ops; +extern struct iommu_ops amd_iommu_ops; +extern int intel_vtd_setup(void); +extern int amd_iov_detect(void); + +static inline struct iommu_ops *iommu_get_ops(void) +{ + switch ( boot_cpu_data.x86_vendor ) + { + case X86_VENDOR_INTEL: + return &intel_iommu_ops; + case X86_VENDOR_AMD: + return &amd_iommu_ops; + default: + BUG(); + } +} + +static inline int iommu_hardware_setup(void) +{ + switch ( boot_cpu_data.x86_vendor ) + { + case X86_VENDOR_INTEL: + return intel_vtd_setup(); + case X86_VENDOR_AMD: + return amd_iov_detect(); + default: + BUG(); + } +} +#endif /* __ASM_X86_HVM_IOMMU_H__ */